home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / bison / bison1~3.zoo / atari.diffs next >
Encoding:
Text File  |  1992-10-01  |  7.8 KB  |  293 lines

  1. *** bison.simple.orig    Wed Sep 30 15:33:59 1992
  2. --- bison.simple    Wed Sep 30 15:34:29 1992
  3. ***************
  4. *** 38,43 ****
  5. --- 38,50 ----
  6.   #endif /* not GNU C.  */
  7.   #endif /* alloca not defined.  */
  8.   
  9. + #ifdef atarist
  10. + #include <stdlib.h>
  11. + #include <string.h>
  12. + #include <unistd.h>
  13. + #include <memory.h>
  14. + #endif /* atarist */
  15.   /* This is the parser code that is written into each bison parser
  16.     when the %semantic_parser declaration is not specified in the grammar.
  17.     It was written by Richard Stallman by simplifying the hairy parser
  18. *** files.c.orig    Wed Sep 30 15:34:00 1992
  19. --- files.c    Wed Sep 30 15:35:20 1992
  20. ***************
  21. *** 69,74 ****
  22. --- 69,77 ----
  23.   extern int verboseflag;
  24.   extern int definesflag;
  25.   int fixed_outfiles = 0;
  26. + #ifdef atarist
  27. + long _stksize = -1L;
  28. + #endif
  29.   
  30.   
  31.   char*
  32. ***************
  33. *** 116,127 ****
  34.   #endif
  35.     int tmp_len;
  36.   
  37. ! #ifdef MSDOS
  38. !   tmp_base = getenv ("TMP");
  39.     if (tmp_base == 0)
  40.       tmp_base = "";
  41.     strlwr (infile);
  42. ! #endif /* MSDOS */
  43.   
  44.     tmp_len = strlen (tmp_base);
  45.   
  46. --- 119,131 ----
  47.   #endif
  48.     int tmp_len;
  49.   
  50. ! #if defined(MSDOS) || defined(atarist)
  51. !   tmp_base = getenv ("TEMP");
  52. !   if(tmp_base == 0) tmp_base = getenv("TMP");
  53.     if (tmp_base == 0)
  54.       tmp_base = "";
  55.     strlwr (infile);
  56. ! #endif /* MSDOS || atarist */
  57.   
  58.     tmp_len = strlen (tmp_base);
  59.   
  60. ***************
  61. *** 130,138 ****
  62.         /* -o was specified.  The precise -o name will be used for ftable.
  63.        For other output files, remove the ".c" or ".tab.c" suffix.  */
  64.         name_base = spec_outfile;
  65. ! #ifdef MSDOS
  66.         strlwr (name_base);
  67. ! #endif /* MSDOS */
  68.         /* BASE_LENGTH includes ".tab" but not ".c".  */
  69.         base_length = strlen (name_base);
  70.         if (!strcmp (name_base + base_length - 2, ".c"))
  71. --- 134,142 ----
  72.         /* -o was specified.  The precise -o name will be used for ftable.
  73.        For other output files, remove the ".c" or ".tab.c" suffix.  */
  74.         name_base = spec_outfile;
  75. ! #if defined(MSDOS) || defined(atarist)
  76.         strlwr (name_base);
  77. ! #endif /* MSDOS || atarist */
  78.         /* BASE_LENGTH includes ".tab" but not ".c".  */
  79.         base_length = strlen (name_base);
  80.         if (!strcmp (name_base + base_length - 2, ".c"))
  81. ***************
  82. *** 159,165 ****
  83.   #else
  84.         strcat (name_base, ".tab");
  85.   #endif
  86. ! #ifdef MSDOS
  87.         strlwr (name_base);
  88.   #endif /* MSDOS */
  89.       }
  90. --- 163,169 ----
  91.   #else
  92.         strcat (name_base, ".tab");
  93.   #endif
  94. ! #if defined(MSDOS) || defined(atarist)
  95.         strlwr (name_base);
  96.   #endif /* MSDOS */
  97.       }
  98. ***************
  99. *** 180,190 ****
  100.   #ifdef VMS
  101.         name_base = stringappend(name_base, short_base_length, "_tab");
  102.   #else
  103. ! #ifdef MSDOS
  104.         name_base = stringappend(name_base, short_base_length, "_tab");
  105.   #else
  106.         name_base = stringappend(name_base, short_base_length, ".tab");
  107. ! #endif /* not MSDOS */
  108.   #endif
  109.         base_length = short_base_length + 4;
  110.       }
  111. --- 184,194 ----
  112.   #ifdef VMS
  113.         name_base = stringappend(name_base, short_base_length, "_tab");
  114.   #else
  115. ! #if defined(MSDOS) || defined(atarist)
  116.         name_base = stringappend(name_base, short_base_length, "_tab");
  117.   #else
  118.         name_base = stringappend(name_base, short_base_length, ".tab");
  119. ! #endif /* not MSDOS || atarist */
  120.   #endif
  121.         base_length = short_base_length + 4;
  122.       }
  123. ***************
  124. *** 192,200 ****
  125.     finput = tryopen(infile, "r");
  126.   
  127.     filename = getenv("BISON_SIMPLE");
  128. ! #ifdef MSDOS
  129.     /* File doesn't exist in current directory; try in INIT directory.  */
  130.     cp = getenv("INIT");
  131.     if (filename == 0 && cp != 0)
  132.       {
  133.         filename = malloc(strlen(cp) + strlen(PFILE) + 2);
  134. --- 196,208 ----
  135.     finput = tryopen(infile, "r");
  136.   
  137.     filename = getenv("BISON_SIMPLE");
  138. ! #if defined(MSDOS) || defined(atarist)
  139.     /* File doesn't exist in current directory; try in INIT directory.  */
  140. + #ifdef atarist
  141. +   cp = getenv("GNULIB");
  142. + #else
  143.     cp = getenv("INIT");
  144. + #endif
  145.     if (filename == 0 && cp != 0)
  146.       {
  147.         filename = malloc(strlen(cp) + strlen(PFILE) + 2);
  148. ***************
  149. *** 208,214 ****
  150.   
  151.     if (verboseflag)
  152.       {
  153. ! #ifdef MSDOS
  154.         outfile = stringappend(name_base, short_base_length, ".out");
  155.   #else
  156.         if (spec_name_prefix)
  157. --- 216,222 ----
  158.   
  159.     if (verboseflag)
  160.       {
  161. ! #if defined(MSDOS) || defined(atarist)
  162.         outfile = stringappend(name_base, short_base_length, ".out");
  163.   #else
  164.         if (spec_name_prefix)
  165. ***************
  166. *** 219,225 ****
  167.         foutput = tryopen(outfile, "w");
  168.       }
  169.   
  170. ! #ifdef MSDOS
  171.     actfile = mktemp(stringappend(tmp_base, tmp_len, "acXXXXXX"));
  172.     tmpattrsfile = mktemp(stringappend(tmp_base, tmp_len, "atXXXXXX"));
  173.     tmptabfile = mktemp(stringappend(tmp_base, tmp_len, "taXXXXXX"));
  174. --- 227,233 ----
  175.         foutput = tryopen(outfile, "w");
  176.       }
  177.   
  178. ! #if defined(MSDOS) || defined(atarist)
  179.     actfile = mktemp(stringappend(tmp_base, tmp_len, "acXXXXXX"));
  180.     tmpattrsfile = mktemp(stringappend(tmp_base, tmp_len, "atXXXXXX"));
  181.     tmptabfile = mktemp(stringappend(tmp_base, tmp_len, "taXXXXXX"));
  182. ***************
  183. *** 241,247 ****
  184.         fdefines = tryopen(tmpdefsfile, "w+");
  185.       }
  186.   
  187. ! #ifndef MSDOS
  188.     unlink(actfile);
  189.     unlink(tmpattrsfile);
  190.     unlink(tmptabfile);
  191. --- 249,255 ----
  192.         fdefines = tryopen(tmpdefsfile, "w+");
  193.       }
  194.   
  195. ! #if !(defined(MSDOS) || defined(atarist))
  196.     unlink(actfile);
  197.     unlink(tmpattrsfile);
  198.     unlink(tmptabfile);
  199. ***************
  200. *** 258,264 ****
  201.     attrsfile = stringappend(name_base, short_base_length, "_stype.h");
  202.     guardfile = stringappend(name_base, short_base_length, "_guard.c");
  203.   #else
  204. ! #ifdef MSDOS
  205.     attrsfile = stringappend(name_base, short_base_length, ".sth");
  206.     guardfile = stringappend(name_base, short_base_length, ".guc");
  207.   #else
  208. --- 266,272 ----
  209.     attrsfile = stringappend(name_base, short_base_length, "_stype.h");
  210.     guardfile = stringappend(name_base, short_base_length, "_guard.c");
  211.   #else
  212. ! #if defined(MSDOS) || defined(atarist)
  213.     attrsfile = stringappend(name_base, short_base_length, ".sth");
  214.     guardfile = stringappend(name_base, short_base_length, ".guc");
  215.   #else
  216. ***************
  217. *** 283,291 ****
  218.     fclose(fparser);
  219.   
  220.     filename = (char *) getenv ("BISON_HAIRY");
  221. ! #ifdef MSDOS
  222.     /* File doesn't exist in current directory; try in INIT directory.  */
  223.     cp = getenv("INIT");
  224.     if (filename == 0 && cp != 0)
  225.       {
  226.         filename = malloc(strlen(cp) + strlen(PFILE1) + 2);
  227. --- 291,303 ----
  228.     fclose(fparser);
  229.   
  230.     filename = (char *) getenv ("BISON_HAIRY");
  231. ! #if defined(MSDOS) || defined(atarist)
  232.     /* File doesn't exist in current directory; try in INIT directory.  */
  233. + #ifdef atarist
  234. +   cp = getenv("GNULIB");
  235. + #else
  236.     cp = getenv("INIT");
  237. + #endif
  238.     if (filename == 0 && cp != 0)
  239.       {
  240.         filename = malloc(strlen(cp) + strlen(PFILE1) + 2);
  241. ***************
  242. *** 385,391 ****
  243.     if (k==0) sys$exit(SS$_NORMAL);
  244.     sys$exit(SS$_ABORT);
  245.   #else
  246. ! #ifdef MSDOS
  247.     if (actfile) unlink(actfile);
  248.     if (tmpattrsfile) unlink(tmpattrsfile);
  249.     if (tmptabfile) unlink(tmptabfile);
  250. --- 397,403 ----
  251.     if (k==0) sys$exit(SS$_NORMAL);
  252.     sys$exit(SS$_ABORT);
  253.   #else
  254. ! #if defined(MSDOS) || defined(atarist)
  255.     if (actfile) unlink(actfile);
  256.     if (tmpattrsfile) unlink(tmpattrsfile);
  257.     if (tmptabfile) unlink(tmptabfile);
  258. *** reader.c.orig    Wed Sep 30 15:34:01 1992
  259. --- reader.c    Wed Sep 30 15:34:30 1992
  260. ***************
  261. *** 52,58 ****
  262.   extern int expected_conflicts;
  263.   extern char *token_buffer;
  264.   
  265. ! #ifndef MSDOS
  266.   extern char *realloc ();
  267.   #endif
  268.   
  269. --- 52,58 ----
  270.   extern int expected_conflicts;
  271.   extern char *token_buffer;
  272.   
  273. ! #if !(defined(MSDOS) || defined(atarist))
  274.   extern char *realloc ();
  275.   #endif
  276.   
  277. *** system.h.orig    Wed Sep 30 15:34:01 1992
  278. --- system.h    Wed Sep 30 15:34:30 1992
  279. ***************
  280. *** 1,3 ****
  281. --- 1,10 ----
  282. + #ifdef atarist
  283. + #include <stdlib.h>
  284. + #include <unistd.h>
  285. + #include <memory.h>
  286. + #include <string.h>
  287. + #endif
  288.   #ifdef MSDOS
  289.   #include <stdlib.h>
  290.   #include <io.h>
  291.